import { createApp } from 'vue'
import { createPinia } from 'pinia'
import App from './App.vue'
import router from './router'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import './style.css'
import 'font-awesome/css/font-awesome.css'

import piniaPluginPersistedstate from 'pinia-plugin-persistedstate';
import persist from 'pinia-plugin-persistedstate';

const pinia = createPinia();
pinia.use(piniaPluginPersistedstate);
pinia.use(persist);

const app = createApp(App);
app.use(pinia);

// 注册所有图标
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component);
}

app.use(router)
app.use(ElementPlus)
app.mount('#app')
